package com.sc.nft.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.DaoSchoolArticleChild;
import com.sc.nft.entity.dto.DaoSchoolArticleChildPageAdminDTO;
import com.sc.nft.entity.dto.DaoSchoolArticleChildSaveAdminDTO;
import com.sc.nft.entity.dto.DaoSchoolArticleChildUpdateSortAdminDTO;
import com.sc.nft.entity.dto.DaoSchoolHomeArticleListDTO;
import com.sc.nft.entity.vo.DaoSchoolArticleChildPageAdminVO;
import com.sc.nft.entity.vo.DaoSchoolTopHomeArticlePageVO;

import java.util.List;

/**
 * 文章表与子分类关联表(DaoSchoolArticleChild)表服务接口
 *
 * @author makejava
 * @since 2023-03-13 16:21:08
 */
public interface DaoSchoolArticleChildService {

    /**
     * 根据文章id获取所有数据
     *
     * @param id
     * @return
     */
    List<DaoSchoolArticleChild> selectByArticleId(Long id);

    /**
     * 获取关联的所有文章
     *
     * @param daoSchoolArticleChildPageAdminDTO
     * @return
     */
    Page<DaoSchoolArticleChildPageAdminVO> pageAdmin(DaoSchoolArticleChildPageAdminDTO daoSchoolArticleChildPageAdminDTO);

    /**
     * 删除关联
     *
     * @param id
     * @return
     */
    Boolean deleteById(Long id);

    /**
     * 文章关联新增
     *
     * @param info
     * @return
     */
    Boolean saveAdmin(List<DaoSchoolArticleChildSaveAdminDTO> info);

    /**
     * 修改排序
     *
     * @param dto
     * @return
     */
    Boolean updateSortById(DaoSchoolArticleChildUpdateSortAdminDTO dto);

    /**
     * 获取置顶的文章
     *
     * @param dto
     * @return
     */
    Page<DaoSchoolTopHomeArticlePageVO> getHomeArticleList(DaoSchoolHomeArticleListDTO dto);

}
